<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>拖拽式建站平台 - 登录/注册</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }
        
        body {
            background-color: #f5f6f7;
            color: #18191c;
            line-height: 1.5;
            display: flex;
            flex-direction: column;
            min-height: 100vh;
        }
        
        .header {
            background: #fff;
            padding: 16px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #e3e5e7;
        }
        
        .logo {
            font-size: 20px;
            font-weight: 500;
            color: #18191c;
            display: flex;
            align-items: center;
        }
        
        .logo i {
            margin-right: 10px;
            color: #3498db;
        }
        
        .main-content {
            display: flex;
            justify-content: center;
            align-items: center;
            flex: 1;
            padding: 40px 20px;
        }
        
        .auth-container {
            width: 100%;
            max-width: 420px;
        }
        
        .auth-card {
            background: #fff;
            border-radius: 4px;
            padding: 30px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }
        
        .auth-header {
            text-align: center;
            margin-bottom: 24px;
        }
        
        .auth-title {
            font-size: 24px;
            font-weight: 500;
            color: #18191c;
            margin-bottom: 8px;
        }
        
        .auth-subtitle {
            font-size: 14px;
            color: #9499a0;
        }
        
        .auth-form {
            margin-bottom: 24px;
        }
        
        .form-group {
            margin-bottom: 16px;
        }
        
        .form-label {
            display: block;
            font-size: 14px;
            color: #61666d;
            margin-bottom: 6px;
            font-weight: 500;
        }
        
        .form-input {
            width: 100%;
            padding: 12px;
            border: 1px solid #e3e5e7;
            border-radius: 4px;
            font-size: 14px;
            transition: all 0.3s ease;
        }
        
        .form-input:focus {
            outline: none;
            border-color: #3498db;
            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
        }
        
        .input-with-icon {
            position: relative;
        }
        
        .input-icon {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #9499a0;
            cursor: pointer;
        }
        
        .form-check {
            display: flex;
            align-items: center;
            margin-bottom: 16px;
        }
        
        .form-check-input {
            margin-right: 8px;
        }
        
        .form-check-label {
            font-size: 14px;
            color: #61666d;
        }
        
        .form-link {
            color: #3498db;
            text-decoration: none;
        }
        
        .form-link:hover {
            text-decoration: underline;
        }
        
        .btn {
            width: 100%;
            padding: 12px;
            border: none;
            border-radius: 4px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .btn-primary {
            background: #3498db;
            color: white;
        }
        
        .btn-primary:hover {
            background: #2980b9;
        }
        
        .btn-google {
            background: #fff;
            color: #61666d;
            border: 1px solid #e3e5e7;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .btn-google:hover {
            background: #f5f7fa;
        }
        
        .btn-google i {
            margin-right: 8px;
            color: #DB4437;
        }
        
        .divider {
            display: flex;
            align-items: center;
            margin: 20px 0;
            color: #9499a0;
            font-size: 14px;
        }
        
        .divider::before,
        .divider::after {
            content: "";
            flex: 1;
            height: 1px;
            background: #e3e5e7;
        }
        
        .divider::before {
            margin-right: 16px;
        }
        
        .divider::after {
            margin-left: 16px;
        }
        
        .auth-footer {
            text-align: center;
            margin-top: 24px;
        }
        
        .auth-footer-text {
            font-size: 14px;
            color: #61666d;
        }
        
        .auth-switch {
            margin-top: 16px;
            text-align: center;
        }
        
        .auth-tabs {
            display: flex;
            margin-bottom: 24px;
            background: #f5f7fa;
            border-radius: 4px;
            padding: 4px;
        }
        
        .auth-tab {
            flex: 1;
            text-align: center;
            padding: 10px;
            border-radius: 3px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            color: #61666d;
            transition: all 0.3s ease;
        }
        
        .auth-tab.active {
            background: #fff;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
            color: #18191c;
        }
        
        .password-requirements {
            font-size: 13px;
            color: #9499a0;
            margin-top: 8px;
        }
        
        .requirement {
            margin-bottom: 4px;
            display: flex;
            align-items: center;
        }
        
        .requirement i {
            margin-right: 6px;
            font-size: 12px;
        }
        
        .requirement.met {
            color: #27ae60;
        }
        
        .footer {
            text-align: center;
            padding: 20px;
            color: #9499a0;
            font-size: 13px;
            border-top: 1px solid #e3e5e7;
            background: #fff;
        }
        
        /* 响应式设计 */
        @media (max-width: 480px) {
            .auth-card {
                padding: 20px;
            }
            
            .auth-title {
                font-size: 20px;
            }
        }
        
        /* 隐藏/显示页面 */
        .page {
            display: none;
        }
        
        .page.active {
            display: block;
        }
    </style>
</head>
<body>
    <div class="header">
        <div class="logo">
            <i class="fas fa-puzzle-piece"></i>
            拖拽式建站平台
        </div>
    </div>
    
    <div class="main-content">
        <div class="auth-container">
            <div class="auth-tabs">
                <div class="auth-tab active" id="login-tab">登录</div>
                <div class="auth-tab" id="register-tab">注册</div>
            </div>
            
            <!-- 登录页面 -->
            <div class="auth-card page active" id="login-page">
                <div class="auth-header">
                    <h1 class="auth-title">欢迎回来</h1>
                    <p class="auth-subtitle">请输入您的账号信息登录系统</p>
                </div>
                
                <form class="auth-form">
                    <div class="form-group">
                        <label class="form-label">邮箱或用户名</label>
                        <input type="text" class="form-input" placeholder="请输入邮箱或用户名">
                    </div>
                    
                    <div class="form-group">
                        <label class="form-label">密码</label>
                        <div class="input-with-icon">
                            <input type="password" class="form-input" placeholder="请输入密码">
                            <span class="input-icon" id="toggle-password">
                                <i class="fas fa-eye"></i>
                            </span>
                        </div>
                    </div>
                    
                    <div class="form-check">
                        <input type="checkbox" class="form-check-input" id="remember">
                        <label class="form-check-label" for="remember">记住我</label>
                        <a href="#" class="form-link" style="margin-left: auto;">忘记密码?</a>
                    </div>
                    
                    <button type="button" class="btn btn-primary">登录</button>
                </form>
                
                <div class="divider">或使用以下方式登录</div>
                
                <button type="button" class="btn btn-google">
                    <i class="fab fa-google"></i> 使用Google账号登录
                </button>
                
                <div class="auth-switch">
                    <span class="auth-footer-text">还没有账号?</span>
                    <a href="#" class="form-link" id="switch-to-register">立即注册</a>
                </div>
            </div>
            
            <!-- 注册页面 -->
            <div class="auth-card page" id="register-page">
                <div class="auth-header">
                    <h1 class="auth-title">创建账号</h1>
                    <p class="auth-subtitle">注册新账号开始使用我们的服务</p>
                </div>
                
                <form class="auth-form">
                    <div class="form-group">
                        <label class="form-label">用户名</label>
                        <input type="text" class="form-input" placeholder="请输入用户名">
                    </div>
                    
                    <div class="form-group">
                        <label class="form-label">邮箱地址</label>
                        <input type="email" class="form-input" placeholder="请输入邮箱地址">
                    </div>
                    
                    <div class="form-group">
                        <label class="form-label">密码</label>
                        <div class="input-with-icon">
                            <input type="password" class="form-input" id="password-input" placeholder="请输入密码">
                            <span class="input-icon" id="toggle-register-password">
                                <i class="fas fa-eye"></i>
                            </span>
                        </div>
                        <div class="password-requirements">
                            <div class="requirement" id="req-length">
                                <i class="fas fa-circle"></i> 至少8个字符
                            </div>
                            <div class="requirement" id="req-uppercase">
                                <i class="fas fa-circle"></i> 包含大写字母
                            </div>
                            <div class="requirement" id="req-number">
                                <i class="fas fa-circle"></i> 包含数字
                            </div>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="form-label">确认密码</label>
                        <div class="input-with-icon">
                            <input type="password" class="form-input" placeholder="请再次输入密码">
                            <span class="input-icon" id="toggle-confirm-password">
                                <i class="fas fa-eye"></i>
                            </span>
                        </div>
                    </div>
                    
                    <div class="form-check">
                        <input type="checkbox" class="form-check-input" id="agree-terms">
                        <label class="form-check-label" for="agree-terms">
                            我已阅读并同意 <a href="#" class="form-link">服务条款</a> 和 <a href="#" class="form-link">隐私政策</a>
                        </label>
                    </div>
                    
                    <button type="button" class="btn btn-primary">注册</button>
                </form>
                
                <div class="divider">或使用以下方式注册</div>
                
                <button type="button" class="btn btn-google">
                    <i class="fab fa-google"></i> 使用Google账号注册
                </button>
                
                <div class="auth-switch">
                    <span class="auth-footer-text">已有账号?</span>
                    <a href="#" class="form-link" id="switch-to-login">立即登录</a>
                </div>
            </div>
        </div>
    </div>
    
    <div class="footer">
        © 2023 拖拽式建站平台 | 让网站建设变得简单
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 页面切换功能
            const loginTab = document.getElementById('login-tab');
            const registerTab = document.getElementById('register-tab');
            const loginPage = document.getElementById('login-page');
            const registerPage = document.getElementById('register-page');
            const switchToRegister = document.getElementById('switch-to-register');
            const switchToLogin = document.getElementById('switch-to-login');
            
            function showLogin() {
                loginTab.classList.add('active');
                registerTab.classList.remove('active');
                loginPage.classList.add('active');
                registerPage.classList.remove('active');
            }
            
            function showRegister() {
                loginTab.classList.remove('active');
                registerTab.classList.add('active');
                loginPage.classList.remove('active');
                registerPage.classList.add('active');
            }
            
            loginTab.addEventListener('click', showLogin);
            registerTab.addEventListener('click', showRegister);
            switchToRegister.addEventListener('click', function(e) {
                e.preventDefault();
                showRegister();
            });
            switchToLogin.addEventListener('click', function(e) {
                e.preventDefault();
                showLogin();
            });
            
            // 密码显示/隐藏功能
            function setupPasswordToggle(inputId, toggleId) {
                const passwordInput = document.getElementById(inputId);
                const toggleButton = document.getElementById(toggleId);
                
                if (passwordInput && toggleButton) {
                    toggleButton.addEventListener('click', function() {
                        if (passwordInput.type === 'password') {
                            passwordInput.type = 'text';
                            toggleButton.innerHTML = '<i class="fas fa-eye-slash"></i>';
                        } else {
                            passwordInput.type = 'password';
                            toggleButton.innerHTML = '<i class="fas fa-eye"></i>';
                        }
                    });
                }
            }
            
            setupPasswordToggle('password-input', 'toggle-register-password');
            setupPasswordToggle('password-input', 'toggle-confirm-password');
            
            // 登录页面的密码显示/隐藏
            const loginPasswordInput = document.querySelector('#login-page input[type="password"]');
            const toggleLoginPassword = document.getElementById('toggle-password');
            
            if (loginPasswordInput && toggleLoginPassword) {
                toggleLoginPassword.addEventListener('click', function() {
                    if (loginPasswordInput.type === 'password') {
                        loginPasswordInput.type = 'text';
                        toggleLoginPassword.innerHTML = '<i class="fas fa-eye-slash"></i>';
                    } else {
                        loginPasswordInput.type = 'password';
                        toggleLoginPassword.innerHTML = '<i class="fas fa-eye"></i>';
                    }
                });
            }
            
            // 密码强度检查（简化版）
            const passwordInput = document.getElementById('password-input');
            if (passwordInput) {
                passwordInput.addEventListener('input', function() {
                    const password = this.value;
                    
                    // 检查密码长度
                    if (password.length >= 8) {
                        document.getElementById('req-length').classList.add('met');
                        document.getElementById('req-length').innerHTML = '<i class="fas fa-check-circle"></i> 至少8个字符';
                    } else {
                        document.getElementById('req-length').classList.remove('met');
                        document.getElementById('req-length').innerHTML = '<i class="fas fa-circle"></i> 至少8个字符';
                    }
                    
                    // 检查大写字母
                    if (/[A-Z]/.test(password)) {
                        document.getElementById('req-uppercase').classList.add('met');
                        document.getElementById('req-uppercase').innerHTML = '<i class="fas fa-check-circle"></i> 包含大写字母';
                    } else {
                        document.getElementById('req-uppercase').classList.remove('met');
                        document.getElementById('req-uppercase').innerHTML = '<i class="fas fa-circle"></i> 包含大写字母';
                    }
                    
                    // 检查数字
                    if (/[0-9]/.test(password)) {
                        document.getElementById('req-number').classList.add('met');
                        document.getElementById('req-number').innerHTML = '<i class="fas fa-check-circle"></i> 包含数字';
                    } else {
                        document.getElementById('req-number').classList.remove('met');
                        document.getElementById('req-number').innerHTML = '<i class="fas fa-circle"></i> 包含数字';
                    }
                });
            }
        });
    </script>
</body>
</html>